<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<c:set var="language" value="${param.language}" />
<c:if test="${language == null}">
<c:set var="language" value="en"/>
</c:if>
<fmt:setLocale value="${language}" />
<fmt:setBundle basename="ict.kth.se.text" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="${language}">
    <head>
    <script type="text/javascript">  
	  
	window.onLoad = extendSearch();  
	  
	function extendSearch() {  
		 if (window.location.href.indexOf("language=") < 0){
	  	 	window.location.href(document.location.href+"?language="+"${language}");  
		 }
	}  
</script>  
        <!-- Meta information --> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="Author" content="Group 12"/>
        
        <title>Grönalund</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

        <!-- Stylesheets --> 
        <link rel="stylesheet" href=<c:url value="/resources/css/style.css"/> />
		<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'/>        
    </head>
    
    <body>
    	<%@ include file="header.jsp" %>
    	<div id="wrapper">        
            <div class="tabs">
             	<!-- tabs -->
            	<ul id="menu" class="tabNavigation">
		    		<li><a href="<c:url value="/?language=${language}"/>" title="Seeker"><label for="homeTitle"><fmt:message key="home.label.homeTitle" /></a></li>
                   
				</ul>           

                <div id="content_container">
                    <div id="peer">
                    	<div id="peer_wrapper">
                    			<div class="spacer"></div>
	                            <h1> <label for="recLogin"><fmt:message key="home.label.h1Login" /> </h1>               
	                            <form name="login_form" action="<c:url value='/j_spring_security_check'/>" method="post">
	    							<label for="username"><fmt:message key="home.label.username" />: <br/>
	    							<input class="inputtext" type="text" name="j_username" size="27" maxlength="80" style="color:#333333;" /><br/>
	    							<label for="password"><fmt:message key="home.label.password" />: <br/>
	    							<input class="inputtext" type="password" name="j_password" size="27" maxlength="20" style="color:#333333;" /><br/>
									<fmt:message key="home.button.submit" var="loginButton" />
									<input class="button" name="submit" type="submit" value="${loginButton}"/>
	  							</form> 							
                       	</div>
                    </div>   
                </div>
            </div>                 
    	</div>   
    </body>
</html>